home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgLangD.iso / Foxpro 2.6 {Windows} / PSSQA.TXT < prev    next >
Text File  |  1994-03-10  |  43KB  |  1,267 lines

  1.             PSSQA.TXT
  2. **********************************************************
  3.           Answers to Commonly Asked Questions About
  4.  
  5.     Microsoft(R) FoxPro(R) for Windows(TM) Version 2.6
  6.  
  7.     (C)1994 Microsoft Corporation. All Rights Reserved.
  8. **********************************************************
  9.  
  10. ========
  11. CONTENTS
  12. ========
  13.  
  14. Part   Description
  15. ----   -----------
  16.  
  17. 1      Cross-Platform 
  18. 2      Interface Features
  19. 3      Report Writer
  20. 4      Screen Builder
  21. 5      Printer Drivers
  22.  
  23. -----------------------------------------------------------
  24. ======================
  25. Part 1: Cross-Platform
  26. ======================
  27.  
  28. Overview of Questions 
  29. ---------------------
  30.  
  31. 1   Can I create a FoxPro for Windows application using 
  32.     FoxPro for MS-DOS?
  33. 2   I have an existing FoxPro 2.0 project. How do I 
  34.     enable it to run in FoxPro version 2.6?
  35. 3   Will I be able to create executable files for 
  36.     FoxPro version 2.6?
  37. 4   Why doesn't my Low Level File I/O program work in
  38.     the Windows Product?
  39. ----------------------------------------------------------
  40.  
  41. Question 1
  42.  
  43. Can I create a FoxPro for Windows application using 
  44. FoxPro for MS-DOS?
  45.  
  46. Answer 1
  47.  
  48. FoxPro for Windows can execute applications you create
  49. with FoxPro for MS-DOS without you making any changes to 
  50. the appplications. The FoxPro for MS-DOS power tools, 
  51. however, don't support features that are specific to the 
  52. Windows environment. You can write your own code to add
  53. these Windows features, but we don't recommend this 
  54. approach to cross-platform application development.
  55. ----------------------------------------------------------
  56.  
  57. Question 2
  58.  
  59. I have an existing FoxPro 2.0 project. How do I enable it
  60. to run in FoxPro version 2.6?
  61.  
  62. Answer 2
  63.  
  64. You open the project in FoxPro version 2.6 and rebuild your 
  65. application. You must convert screens and reports only if
  66. you decide to modify them.
  67. ----------------------------------------------------------
  68.  
  69. Question 3
  70.  
  71. Will I be able to create executable files for FoxPro version 2.6?
  72.  
  73. Answer 3
  74.  
  75. Yes. The options for building .EXE files in FoxPro 2.6 for
  76. MS-DOS are the same as in FoxPro 2.0. You can build 
  77. compact and stand-alone .EXE files. Compact .EXE files are 
  78. distributed with library files that are included in the 
  79. FoxPro Distribution Kit. Stand-alone .EXE files don't 
  80. require the FoxPro library files. The information from the 
  81. libraries is built into a stand-alone .EXE.
  82.  
  83. In FoxPro for Windows, you can create the equivalent of 
  84. the compact .EXE file. These files are distributed with 
  85. the library files included in the FoxPro for Windows 
  86. Distribution Kit.
  87.  
  88. Question 4
  89.  
  90. Why doesn't my Low Level File I/O program work in
  91. the Windows Product?
  92.  
  93. Answer 4
  94.  
  95. FoxPro for Windows can not access the COM  ports with 
  96. the Low Level File commands.
  97.  
  98. This is documented if you look at the FOPEN() command, 
  99. but many people who are accustomed to opening a port in 
  100. the MS-DOS product would test this function and think it is
  101. broken.
  102.  
  103. This is not a bug  - it is product design.  In the Windows
  104. multi-tasking environment, other applications besides 
  105. FoxPro  may also be using the COM ports.  It is not 
  106. desirable to allow a Windows application to take exclusive 
  107. control of the communications port.
  108.  
  109. Access to the COM port would be provided through 
  110. FoxTools.FLL and the Windows API calls.  In the 
  111. Foxprow\goodies\foxtools directory is a file called dialer.prg
  112. This shows an example of using the com port under the 
  113. Windows environment.
  114.  
  115. The use of the REGFN() and CALLFN() are documented in
  116. the foxtools.wri file in the same directory as the example.
  117.  
  118. Refer to the Windows SDK documentation for information
  119. on specific API calls.
  120. ----------------------------------------------------------
  121. ==========================
  122. Part 2: Interface Features
  123. ==========================
  124.  
  125. Overview of Questions
  126. ---------------------
  127.  
  128. 1   Why do the windows created in FoxPro for Windows have 
  129.     different style controls when compared with the 
  130.     windows in FoxPro for MS-DOS?
  131. 2   What is the purpose of the Control-menu box at the 
  132.     top left of FoxPro windows?
  133. 3   Why is it that some windows in FoxPro can be resized 
  134.     and others can't?
  135. 4   Why have the keyboard shortcuts in FoxPro for Windows 
  136.     been changed? Is there a way to restore the FoxPro for
  137.     MS-DOS style keystrokes?
  138. 5   When I create a table and press Enter to add a new 
  139.     field I find that the dialog unexpectedly closes. Why
  140.     is this?
  141. 6   FoxPro for Windows automatically displays a status bar
  142.     located at the bottom of the main window. Is it 
  143.     possible to remove this status bar? Is the DOS-style 
  144.     status bar available?
  145. 7   When I issue the command SET DISPLAY TO VGA50 and then
  146.     issue the command SET DISPLAY TO VGA25 to restore the
  147.     previous setting, the status bar disappears. How do I
  148.     restore the status bar?
  149. 8   Why has the menu for FoxPro for Windows changed?
  150.     Is the MS-DOS version of the menu available?
  151. 9   The Edit menu contains a number of new options such as
  152.     Paste Special... and Change Link.... How do I use 
  153.     these options? 
  154. 10  The Program menu contains a new option, Beautify. What 
  155.     does it do?
  156. 11  The Text menu is completely new. What new features 
  157.     does this menu offer? 
  158. 12  Occasionally the Object menu is available. When and 
  159.     why is it displayed?
  160. 13  FoxPro for Windows includes Windows-style help. Is 
  161.     there any way to access the .DBF-style help I used in 
  162.     Fox 2.0?
  163. 14  Shouldn't I get a full path display rather than just 
  164.     the drive letter when I issue the following command 
  165.     in the Command window?
  166.  
  167.          ? SET("DEFAULT")
  168. ----------------------------------------------------------
  169.  
  170. Question 1
  171.  
  172. Why do the windows created in FoxPro for Windows have 
  173. different style controls when compared with the windows in 
  174. FoxPro for MS-DOS?
  175.  
  176. Answer 1
  177.  
  178. FoxPro for Windows is designed to conform to the Windows 
  179. 3.1 interface guidelines for applications. These 
  180. guidelines enable you to use the same methods of moving, 
  181. selecting, and changing windows with all Windows 
  182. applications. FoxPro windows now include Control-menu 
  183. boxes and Minimize, Maximize, and Restore buttons. For a 
  184. complete discussion of window styles and terminology, 
  185. refer to the Getting Started manual.
  186. ----------------------------------------------------------
  187.  
  188. Question 2
  189.  
  190. What is the purpose of the Control-menu box at the 
  191. top left of FoxPro windows?
  192.  
  193. Answer 2
  194.  
  195. A single click in the Control-menu box displays the 
  196. Control menu, with which you can move, size, close, and 
  197. select windows. A double-click in the Control-menu box 
  198. closes the window.
  199. ----------------------------------------------------------
  200.  
  201. Question 3
  202.  
  203. Why is it that I can resize some windows in FoxPro 
  204. and not others?
  205.  
  206. Answer 3
  207.  
  208. FoxPro for Windows contains both windows you can size and 
  209. windows you can't size. Windows that contain a text-
  210. editing region are sizable. Examples of sizable windows 
  211. are the Command window, Screen Design window and the 
  212. Calendar. These windows may contain scroll bars and a 
  213. sizing box in the bottom right corner of the window. 
  214. Examples of windows you can't size include the View and 
  215. RQBE windows. Windows you can't size have only the 
  216. Control-menu box and the Minimize button.
  217. ----------------------------------------------------------
  218.  
  219. Question 4
  220.  
  221. Why have the keyboard shortcuts in FoxPro for Windows 
  222. changed? Is there a way to restore the FoxPro for MS-DOS 
  223. style keystrokes?
  224.  
  225. Answer 4
  226.  
  227. FoxPro for Windows supports Windows-style keystrokes, such 
  228. as using Enter to choose a focused selection. FoxPro for 
  229. Windows supports both an MS-DOS keystroke mode and Windows
  230. keystroke mode. Refer to the FoxPro online help for 
  231. details on the keystroke differences. You were asked at
  232. installation time which mode to select. However, you can 
  233. change the mode interactively at any time in FoxPro by 
  234. issuing the command:
  235.  
  236.    SET KEYCOMP TO DOS  
  237. or
  238.    SET KEYCOMP TO WINDOWS
  239.  
  240. Each time you load FoxPro, the default KEYCOMP setting 
  241. you specify during installation will be in effect. To 
  242. change the default setting of KEYCOMP, include the 
  243. appropriate statement the CONFIG.FPW file:
  244.  
  245.    KEYCOMP=DOS  
  246. or
  247.    KEYCOMP=WINDOWS
  248. ----------------------------------------------------------
  249.  
  250. Question 5
  251.  
  252. When I create a table and press Enter to add a new field 
  253. I find that the dialog unexpectedly closes. Why is this?
  254.  
  255. Answer 5
  256.  
  257. The keystroke navigation is different in Windows and 
  258. MS-DOS. In FoxPro for MS-DOS, the keystroke equivalent of
  259. clicking the focus button is Ctrl+Enter. In Windows, it 
  260. is Enter. So pressing Enter in the Table Structure dialog
  261. tells FoxPro you have chosen the OK button. To establish 
  262. the MS-DOS keystroke mode in Windows, issue the command 
  263. SET KEYCOMP TO DOS.
  264. ----------------------------------------------------------
  265.  
  266. Question 6
  267.  
  268. FoxPro for Windows automatically displays a status bar 
  269. located at the bottom of the main window. Is it possible
  270. to remove this status bar? Is the MS-DOS style status bar 
  271. available?
  272.  
  273. Answer 6
  274.  
  275. The Windows-style status bar displays the same information
  276. as the MS-DOS-style status bar, plus information about the 
  277. currently selected menu name or command and messages you 
  278. create using FoxPro commands. It can also display the 
  279. system time.
  280.  
  281. The Windows-style status bar is displayed by default. To 
  282. remove the status bar, in the Command window issue the 
  283. command:
  284.  
  285.    SET STATUS BAR OFF
  286.  
  287. Alternatively, in CONFIG.FPW enter the item:
  288.  
  289.    STATUS BAR = OFF
  290.  
  291. To restore the status bar, substitute ON for OFF in
  292. the previous two examples.
  293.  
  294. The SET MESSAGE TO command you use to specify a 
  295. message location is ignored when the Windows style status
  296. bar is active. When the Windows-style status bar is 
  297. active, messages you create with commands such as DEFINE 
  298. MENU, DEFINE POPUP, DEFINE BAR, and @...PROMPT, 
  299. appear in the Windows-style status bar.
  300.  
  301. When the Windows-style status bar is active, to display 
  302. the time on the right hand side of the status bar 
  303. issue the following command: 
  304.  
  305.    SET CLOCK STATUS
  306.  
  307. Alternatively, in CONFIG.FPW enter the item:
  308.  
  309.    CLOCK = STATUS
  310.  
  311. For compatibility with existing FoxPro 2.0 applications, 
  312. FoxPro for Windows displays the MS-DOS style status bar 
  313. when you issue the command SET STATUS ON.
  314. ----------------------------------------------------------
  315.  
  316. Question 7
  317.  
  318. When I issue the command SET DISPLAY TO VGA50 and then 
  319. issue the command SET DISPLAY TO VGA25 to restore the 
  320. previous setting, the status bar disappears. How do I 
  321. restore the status bar?
  322.  
  323. Answer 7
  324.  
  325. Issue the SET STATUS BAR ON command.
  326. ----------------------------------------------------------
  327.  
  328. Question 8
  329.  
  330. Why has the menu for FoxPro for Windows changed? 
  331. Is the MS-DOS version of the menu available?
  332.  
  333. Answer 8
  334.  
  335. The menu in FoxPro for Windows has been modified for 
  336. consistency with the standard Windows interface. The 
  337. System menu on the FoxPro 2.0 menu bar has been removed 
  338. and a number of specific menu items have been moved.
  339.  
  340. Take a moment to explore the new menu structure. Note that
  341. a brief message describing each menu item is displayed in 
  342. the status bar at the bottom of the main FoxPro window.
  343.  
  344. If you are more comfortable with the menu bar layout of 
  345. FoxPro 2.0, you can run a distributed FoxPro menu program
  346. that recreates it. Simply execute the DOS.MPR file 
  347. located in the GOODIES subdirectory with the DO command. 
  348. Running this menu program replaces the FoxPro for Windows 
  349. menu bar layout with the FoxPro for MS-DOS menu bar 
  350. layout while retaining the Text menu for multiple font 
  351. support.
  352.  
  353. To automatically display the FoxPro for MS-DOS menu bar 
  354. when you load FoxPro for Windows, place the following 
  355. item in the CONFIG.FPW file to execute the DOS.MPR 
  356. program:
  357.  
  358.    COMMAND = DO C:\FOXPROW\GOODIES\DOS\DOS.MPR
  359.  
  360. Modify the path specification for DOS.MPR based on your 
  361. specific installation.
  362. ----------------------------------------------------------
  363.  
  364. Question 9
  365.  
  366. The Edit menu contains a number of new options such as 
  367. Paste Special... and Change Link... . How do I use these 
  368. options?
  369.  
  370. Answer 9
  371.  
  372. The new Edit menu options support Object Linking and 
  373. Embedding (OLE). The items include Paste Special, Insert 
  374. Object, Object, Change Link, and Convert to Static. For 
  375. a detailed discussion of OLE consult the FoxPro
  376. documentation.
  377. ----------------------------------------------------------
  378.  
  379. Question 10
  380.  
  381. The Program menu contains the new option, Beautify. What 
  382. does it do?
  383.  
  384. Answer 10
  385.  
  386. The Beautify option alters the appearance of program files 
  387. so they are easier to read. For example, you can choose to 
  388. alter the case of key words and variables, and to add 
  389. indentation within procedures and DO CASE statements. 
  390. You can alaso highlight program organization by 
  391. bracketing specific control statements such as: 
  392.  
  393.    IF
  394.      DO something
  395.    ELSE
  396.      DO something
  397.    ENDIF  
  398. ----------------------------------------------------------
  399.  
  400. Question 11
  401.  
  402. The Text menu is completely new. What new features does 
  403. this menu offer? 
  404.  
  405. Answer 11
  406.  
  407. The Text Menu adds support for multiple fonts and text 
  408. formatting. The Font option makes all of your installed 
  409. Windows fonts available within FoxPro. A Font option is 
  410. also available in the Browse menu for Browse windows.
  411.  
  412. To change the main FoxPro window font, hold down the 
  413. Shift key when you choose the Text menu pad. Then choose 
  414. the Screen Font... option.
  415.  
  416. The Enlarge Font and Reduce Font options change all text 
  417. to the next available point size in the current font. To 
  418. alter the spacing of the text, select the Single Space, 
  419. 1 1/2 Space, or Double Space option.
  420.  
  421. The Indent option indents the selected group of lines one 
  422. tab stop. Undent does the opposite by moving a selected 
  423. group of lines out one tab stop.
  424. ----------------------------------------------------------
  425.  
  426. Question 12
  427.  
  428. Occasionally the Object menu is available. When does it 
  429. display and why?
  430.  
  431. Answer 12
  432.  
  433. The Object menu is available when either the Screen 
  434. Builder or the Report Writer window is open. As with the 
  435. Text and Browse menus, the Object menu provides access to 
  436. fonts. Specific items on the Object menu are enabled and 
  437. disabled based on the currently selected object.
  438.  
  439. For example, a rectangle drawn in the Screen Design window 
  440. may have an outline or pen color, a background or fill 
  441. color, and a fill pattern.
  442. ----------------------------------------------------------
  443.  
  444. Question 13
  445.  
  446. FoxPro for Windows includes Windows-style help. Is there 
  447. any way to access the .DBF-style help I used in Fox 2.0?
  448.  
  449. Answer 13
  450.  
  451. By default, FoxPro for Windows uses Windows-style help. To 
  452. access the .DBF-style help, issue the following command:
  453.  
  454.    SET HELP TO FOXHELP.DBF
  455.  
  456. Pressing F1 or choosing Contents from the menu will then 
  457. open .DBF-style help.
  458.  
  459. To return to the Windows-style help, issue the following 
  460. command:
  461.     
  462.    SET HELP TO FOXHELP.HLP
  463.  
  464. To change the default help to the .DBF-style help, add 
  465. this statement to your CONFIG.FPW file:
  466.  
  467.    HELP = FOXHELP.DBF
  468. ----------------------------------------------------------
  469.  
  470. Question 14
  471.  
  472. Shouldn't a full path rather than just the drive letter 
  473. display when I issue the following command in the command 
  474. window?
  475.  
  476.        ? SET("DEFAULT")
  477.  
  478. Answer 14
  479.  
  480. No. This is consistent with FoxPro 2.0 for MS-DOS.
  481. ----------------------------------------------------------
  482. =====================
  483. Part 3: Report Writer
  484. =====================
  485.  
  486. Overview of Questions
  487. ---------------------
  488.  
  489. 1   Should I convert all of my FoxPro 2.0 reports to 
  490.     FoxPro for Windows format?
  491. 2   I used the Quick Report option to create my initial 
  492.     report. Now I want to add another field. In FoxPro 
  493.     for MS-DOS, the Report menu popup contained an option 
  494.     called Field... which allowed me to add a single 
  495.     field. What do I do in FoxPro for Windows?
  496. 3   I have included a memo-type field in my report but 
  497.     only the first line prints. How can I fix this?
  498. 4   When I place a "stretched" memo field in the detail 
  499.     band, I find that the fields which display below the 
  500.     memo field are being overwritten by some of the longer 
  501.     memo fields. How do I avoid this?
  502. 5   I have placed boxes around several fields in my 
  503.     report. One of these fields is a memo field. How do I 
  504.     make the box stretch to fit the memo field?
  505. 6   When I attempt to move a text object to a specific 
  506.     location in the Report Design window, the field keeps 
  507.     aligning itself with the nearest grid line. Why is 
  508.     this happening?
  509. 7   How do I design and print multi-column reports in 
  510.     FoxPro 2.6 for Windows?
  511. 8   When I enlarge the font of objects in my report and 
  512.     print it, some of the information in the fields is 
  513.     obscured. How can I fix this?
  514. ----------------------------------------------------------
  515.  
  516. Question 1
  517.  
  518. Should I convert all of my FoxPro 2.0 reports to FoxPro 
  519. for Windows format?
  520.  
  521. Answer 1
  522.  
  523. You may not need to. Your existing character reports will 
  524. run, preview, and print unchanged in FoxPro for Windows. 
  525. The engine for printing character reports is included in 
  526. FoxPro for Windows. If you want to include graphical 
  527. elements such as fonts and pictures in a report, then you 
  528. can convert the reports to FoxPro for Windows format, or 
  529. create new graphical reports from scratch.
  530. ----------------------------------------------------------
  531.  
  532. Question 2
  533.  
  534. I used the Quick Report option to create my initial 
  535. report. Now I want to add another field. In FoxPro for 
  536. MS-DOS, the Report menu contained an option called 
  537. Field... which allowed me to add a single field. What do 
  538. I do in FoxPro for Windows?
  539.  
  540. Answer 2
  541.  
  542. You can add new fields by using the field tool 
  543. located in the toolbox on the left side of the Report 
  544. Design window. See the FoxPro for Windows User's Guide for 
  545. additional information on the Report Writer toolbox.
  546. ----------------------------------------------------------
  547.  
  548. Question 3
  549.  
  550. I have included a memo-type field in my report but only 
  551. the first line prints. How can I fix this?
  552.  
  553. Answer 3
  554.  
  555. To display the entire contents of the memo field, you must
  556. make the field stretch vertically to fit its contents. 
  557. Double-click the report field and select the Top - Field 
  558. Can Stretch option from the Position Relative To item. 
  559. This field will now enlarge depending on the length 
  560. of the memo field contents. Select the Page Preview option 
  561. to view the result.
  562. ----------------------------------------------------------
  563.  
  564. Question 4
  565.  
  566. When I place a "stretched" memo field in the detail band, 
  567. I find that the fields which display below the memo field 
  568. are being overwritten by some of the longer memo fields. 
  569. How do I avoid this?
  570.  
  571. Answer 4
  572.  
  573. Fields or objects positioned below the memo field are 
  574. still being displayed in a fixed position even though the 
  575. memo field is now stretchable. To avoid being overwritten, 
  576. all objects below the memo field should be positioned 
  577. relative to the bottom of the Detail band. To accomplish 
  578. this, double-click on each of the fields and select the 
  579. Bottom option from the Position Relative To item. Select 
  580. the Page Preview option to view the result. If your report 
  581. contains side-by-side memo fields, fields with the Bottom 
  582. option specified will display below the longer of the two 
  583. memo fields.
  584.  
  585. Note: The previous procedure applies to non-stretching 
  586. fields and other objects, such as lines and text. If you 
  587. have stretching fields placed below other stretching 
  588. fields, you don't want to position them "relative to 
  589. bottom." Stretching fields automatically float below other 
  590. stretching fields.
  591. ----------------------------------------------------------
  592.  
  593. Question 5
  594.  
  595. I have placed boxes around several fields in my report. 
  596. One of these fields is a memo field. How do I make the box 
  597. stretch to fit the memo field?
  598.  
  599. Answer 5
  600.  
  601. Double-click the box and select the Stretch With Band 
  602. option from the Position Relative To item. Rectangles 
  603. (boxes) and vertical lines can optionally stretch 
  604. according to the length of the Detail band.
  605.  
  606. Note:  You won't be able to place a stretching box around 
  607. a field if the field won't be positioned relative to 
  608. the top or the bottom of the band. Boxes must be 
  609. positioned relative to the top or bottom of the band.
  610. ----------------------------------------------------------
  611.  
  612. Question 6
  613.  
  614. When I attempt to move a text object to a specific 
  615. location in the Report Design window, the field keeps 
  616. aligning itself with the nearest grid line. Why is this 
  617. happening?
  618.  
  619. Answer 6
  620.  
  621. By default, objects are automatically aligned to the 
  622. nearest invisible grid lines within the Report Design 
  623. window. This feature is called Snap to Grid and may be 
  624. disabled by deselecting the Snap to Grid option from the 
  625. Report menu.
  626. ----------------------------------------------------------
  627.  
  628. Question 7
  629.  
  630. How do I design and print multi-column reports in FoxPro 
  631. 2.6 for Windows?
  632.  
  633. Answer 7
  634.  
  635. Select Page Layout... from the Report menu option and use 
  636. the Columns spinner to select the number of columns. 
  637. Clicking the up arrow increases the counter value, and 
  638. clicking the down arrow decreases the counter value. 
  639. The size of the Report Design window reflects the new 
  640. column width, and you may need to modify existing field 
  641. positions.
  642.  
  643. Hint: When creating a new report that will have columns, 
  644. set the layout before you add any fields.
  645. ----------------------------------------------------------
  646.  
  647. Question 8
  648.  
  649. When I enlarge the font of objects in my report and print 
  650. the report, some of the information in the fields is 
  651. obscured. How can I fix this?
  652.  
  653. Answer 8
  654.  
  655. You may need to stretch the detail lines and/or the 
  656. objects themselves to accommodate the larger font.
  657. ----------------------------------------------------------
  658. ======================
  659. Part 4: Screen Builder
  660. ======================
  661.  
  662. Overview of Questions
  663. ---------------------
  664.  
  665. 1   I don't own a mouse. How can I create a screen using 
  666.     the keyboard?
  667. 2   The Field dialog in the Screen Design window allows me 
  668.     to create only an input field or an output field.
  669.     What happened to the Edit field option in the field 
  670.     dialog?
  671. 3   When I select the push button tool in the Screen 
  672.     Design window I have a choice of three button types: 
  673.     Normal, Invisible and Picture. Were these types 
  674.     available in FoxPro 2.0?
  675. 4   I know how to click and drag objects within the Screen 
  676.     Design window using the Selection pointer tool. Is 
  677.     there an easy way to move objects a small distance?
  678. 5   I created a screen for my application which 
  679.     displays a number of fields. After creating the 
  680.     application, when I move the cursor from one field to 
  681.     the next the order in which the cursor moves to the 
  682.     fields isn't what I expect based on the physical 
  683.     arrangement of the fields. How can I change the field 
  684.     access order without changing the physical position of 
  685.     the fields?
  686. 6   When generating screens in FoxPro 2.0, I was able to 
  687.     specify exactly what code to generate. Options 
  688.     included adding code to open and close files, define 
  689.     and release windows, and create modal screens. Is this 
  690.     option still available?
  691. 7   The Color option is no longer on the Screen menu. How 
  692.     do I specify colors for my screen objects?
  693. 8   When I use an @... SAY statement to display 
  694.     the contents of a general field, nothing appears. What 
  695.     am I doing wrong?
  696. 9   I used the picture tool to add a picture field to my 
  697.     screen and specified the appropriate .BMP file.  
  698.     Please explain in more detail how the options in 
  699.     the area called If Picture and Frame Different Size 
  700.     affect the display of the picture. The options are 
  701.     Clip Picture, Scale Picture - Retain Shape and Scale 
  702.     Picture - Fill the Frame.
  703. 10  I want to create a screen that allows online editing,  
  704.     while a READ is active, of OLE objects stored in a 
  705.     general field. When I add a picture to my screen 
  706.     using the picture tool, I'm not able to edit the 
  707.     displayed .BMP file. Is there a way to do this?
  708. 11  Why can't I type as many characters into an input 
  709.     field as it appears will fit?
  710. 12  How do I control the length of a memory variable 
  711.     independent of the size of an input field defined with 
  712.     @ ... GET ... SIZE?
  713. 13  How can I be sure that a font I choose will be 
  714.     available at the client site?
  715. 14 How do I coordinate Browse Windows with Screens?
  716. 15 Are the Keyboard Shortcuts for FoxPro for Windows
  717.     screen builder documented?
  718. ----------------------------------------------------------
  719.  
  720. Question 1
  721.  
  722. I don't own a mouse. How can I create a screen using the 
  723. keyboard?
  724.  
  725. Answer 1
  726.  
  727. A mouse is required to create a screen with the Screen 
  728. Builder.
  729. ----------------------------------------------------------
  730.  
  731. Question 2
  732.  
  733. The Field dialog in the Screen Design window allows me to
  734. create only an input field or an output field. What 
  735. happened to the Edit field option in the field dialog?
  736.  
  737. Answer 2
  738.  
  739. The edit field option is now part of the new Edit Region 
  740. dialog. To create an edit field, click the edit region 
  741. tool located on the left side of the Screen Design window. 
  742. Notice that as you select the tool a brief description 
  743. appears in the status bar at the bottom of the screen. In 
  744. the Edit Region dialog the options Select on Entry and 
  745. Initially Disable Edit Region are new. For additional 
  746. information on these options see the Edit Region Dialog 
  747. topic in Help.
  748. ----------------------------------------------------------
  749.  
  750. Question 3
  751.  
  752. When I select the push button tool in the Screen Design 
  753. window I have a choice of three button types: Normal, 
  754. Invisible and Picture. Were these types available in 
  755. FoxPro 2.0?
  756.  
  757. Answer 3
  758.  
  759. FoxPro for Windows has consolidated the Invisible Button 
  760. and Push Button options into a single dialog. The Picture 
  761. type push button is new. You can create a picture push 
  762. button using a bitmap (.BMP) picture file to graphically 
  763. depict the action the push button represents. You can also 
  764. use picture files with radio buttons and check boxes in 
  765. FoxPro for Windows.
  766. ----------------------------------------------------------
  767.  
  768. Question 4
  769.  
  770. I know how to click and drag objects within the Screen 
  771. Design window using the Selection pointer tool. Is there an 
  772. easy way to move objects a small distance?
  773.  
  774. Answer 4
  775.  
  776. Yes. Select the object to move using the Selection 
  777. pointer tool and use the arrow keys to move the object one
  778. pixel at a time.
  779. ----------------------------------------------------------
  780.  
  781. Question 5
  782.  
  783. I created a screen for my application which displays a 
  784. number of fields. After creating the application, when I 
  785. move the cursor from one field to the next the order in 
  786. which the cursor moves to the fields isn't what I expect 
  787. based on the physical arrangement of the fields. How can I 
  788. change the field access order without changing the 
  789. physical position of the fields?
  790.  
  791.  
  792. Answer 5
  793.  
  794. To accomplish this, return to your original screen in the 
  795. Screen Design window. From the Screen menu, select the 
  796. Object Order... option. This option opens the Object Order 
  797. dialog, where screen objects are listed according to their 
  798. keyboard access order. To change the access order for the 
  799. objects, click the button to the left of the object and 
  800. drag the object to its new keyboard access position. 
  801. When your're done, rebuild your application to include 
  802. the new field access order.
  803. ----------------------------------------------------------
  804.  
  805. Question 6
  806.  
  807. When generating screens in FoxPro 2.0, I was able to 
  808. specify what code to generate. Options included adding 
  809. code to open and close files, define and release windows, 
  810. and create modal screens. Is this option still available?
  811.  
  812. Answer 6
  813.  
  814. Yes. The Generate Screen dialog contains a More button. 
  815. Choose this button to view the generate code options.
  816. ----------------------------------------------------------
  817.  
  818. Question 7
  819.  
  820. The Color option is no longer on the Screen menu. How do 
  821. I specify colors for my screen objects?
  822.  
  823. Answer 7
  824.  
  825. To specify colors, first select the object or a group of 
  826. objects. To modify the background color of the object 
  827. select Fill Color from the Object menu. To modify the 
  828. outline and text of an object, select Pen Color from the 
  829. Object menu.
  830.  
  831. The AUTOMATIC setting will match the Windows color sets. 
  832.  
  833. To change the background of the entire screen, choose 
  834. Layout... from the Screen menu and click on the Color 
  835. option. You may choose a specific color or select a 
  836. wallpaper pattern by clicking Wallpaper and specifying a 
  837. specific .BMP file.
  838. ----------------------------------------------------------
  839.  
  840. Question 8
  841.  
  842. When I use an @... SAY statement to display the contents 
  843. of a general field, nothing appears. What am I doing 
  844. wrong?
  845.  
  846. Answer 8
  847.  
  848. Use the Picture tool to display the contents of a general 
  849. field. The Field tool can't display a picture.
  850. ----------------------------------------------------------
  851.  
  852. Question 9
  853.  
  854. I used the Picture tool to add a picture field to my 
  855. screen and specified the appropriate .BMP file. Please 
  856. explain in more detail how the options in the area called 
  857. If Picture and Frame Different Size affect the display of 
  858. the picture. The options are Clip Picture, Scale Picture - 
  859. Retain Shape and Scale Picture - Fill the Frame.
  860.  
  861. Answer 9
  862.  
  863. The following options only apply when the picture and 
  864. frame are of of a different size.
  865.  
  866. Choose Clip Picture if you want to retain the original 
  867. dimensions of the picture. If the picture is larger than 
  868. the frame only a portion of the image is displayed 
  869. beginning with the top-left portion of the picture. Any 
  870. portion of the picture that extends beyond the frame is 
  871. hidden.
  872.  
  873. Choose Scale Picture - Retain Shape if you want to retain 
  874. the overall shape of the picture but fill as much of the 
  875. frame as possible. The picture is protected from 
  876. vertical or horizontal distortion.
  877.  
  878. Choose Scale Picture - Fill the Frame if you want to fill 
  879. the frame completely. The picture is horizontally or 
  880. vertically distorted as needed to fill the frame.
  881. ----------------------------------------------------------
  882.  
  883. Question 10
  884.  
  885. I want to create a screen that allows online editing, 
  886. while a READ is active, of OLE objects stored in a general 
  887. field. When I add a picture to my screen 
  888. using the picture tool, I'm not able to edit the 
  889. displayed .BMP file. Is there a way to do this?
  890.  
  891. Answer 10
  892.  
  893. Use the Field tool in the Screen Design window to create 
  894. a general field in your screen. Select the WHEN clause and 
  895. enter the command MODIFY GENERAL <field name> in the code 
  896. snippet area. Save the screen and generate your screen 
  897. and/or application. Now you will be able to edit the 
  898. bitmap within the screen when the application is running.
  899. ----------------------------------------------------------
  900.  
  901. Question 11
  902.  
  903. Why can't I type as many characters into an input field as 
  904. it appears will fit?
  905.  
  906. Answer 11
  907.  
  908. In a proportional font, each character is given as much 
  909. horizontal space as it needs and no more. For example, a 
  910. lowercase "f" requires much less space than an uppercase 
  911. "W." When an input field displays in a screen, FoxPro 
  912. calculates the display width of the field by multiplying 
  913. the number of characters in the table field structure by 
  914. the average size of a character in the specified font. If 
  915. the field is filled with characters that are wider than 
  916. average, the characters don't all fit within the display 
  917. width of the input field and so the characters scroll. If 
  918. the field is filled with characters that are narrower than 
  919. average, the characters don't fill the display width of 
  920. the input field. 
  921. ----------------------------------------------------------
  922.  
  923. Question 12
  924.  
  925. How do I control the length of a memory variable 
  926. independent of the size of an input field defined with 
  927. @ ... GET ... SIZE?
  928.  
  929. Answer 12
  930.  
  931. Use a picture clause to control the memory variable's 
  932. length, and an @ ... GET ... SIZE clause to control the 
  933. width of the input field.
  934. ----------------------------------------------------------
  935.  
  936. Question 13
  937.  
  938. How can I be sure that a font I choose will be available 
  939. at the client site?
  940.  
  941. Answer 13
  942.  
  943. The safest way is to look in your WIN.INI file for 
  944. fonts that have the words "All res" on the line. These 
  945. are standard Windows fonts and consequently are those 
  946. most likely to be available at a client site.
  947.  
  948. Question 14
  949.  
  950. How do I coordinate Browse Windows with Screens?
  951.  
  952. Answer 14
  953.  
  954. Page D2-96 of the FoxPro for Windows "Developer's Guide"
  955.  and page D2-90 ofthe FoxPro for MS-DOS "Developers 
  956. Guide" give samples for coordinating Browse windows with
  957. screens but omits the SAVE clause in the example. If
  958. the optional BROWSE parameter SAVE is omitted, the Browse
  959. window will closeas soon as any other object is clicked.
  960.  
  961. The code example should be changed to read as follows:
  962.  
  963.    IF NOT WVISIBLE("Client List")
  964.       BROWSE NORMAL NOWAIT NODELETE LAST;
  965.          TITLE "Client List" ;
  966.          NOAPPEND NOMENU SAVE FIELDS company ;
  967.          WHEN showgets()
  968.    ENDIF
  969.  
  970.    IF NOT WVISIBLE("Account Details")
  971.       SELECT details
  972.          BROWSE NORMAL NOWAIT NODELETE LAST;
  973.             TITLE "Client List" ;
  974.             NOAPPEND NOMENU SAVE  ;
  975.             FIELDS ;
  976.             Trans_type:10, ;
  977.             Trans_date:10, ;
  978.             Amt:7,Service
  979.       SELECT clients
  980.    ENDIF
  981.  
  982. Question 15 
  983.  
  984. Are the Keyboard Shortcuts for FoxPro for Windows screen
  985. builder documented?
  986.  
  987. Answer 15
  988.  
  989. FoxPro for Windows requires a mouse. MS-DOS users who are
  990. used to using the keyboard for creating screens are often 
  991. confused by the lackof keyboard support in the Screen 
  992. Builder. In a graphical environment such as Windows, the 
  993. mouse provides a more effective means of locating and/or moving 
  994. objects than the keyboard does.
  995.  
  996. To complete the transition from designing with the keyboard 
  997. to designing with the mouse, icons have been added for every 
  998. tool in the Screen Builder. These icons take the place of the
  999. menu shortcuts that exist in FoxPro for MS-DOS.
  1000.  
  1001. ----------------------------------------------------------
  1002.  
  1003. =================================
  1004. Part 5: Printer Driver Questions
  1005. =================================
  1006.  
  1007. Overview of Questions
  1008. ---------------------
  1009.  
  1010. 1   How do I use @ ... SAY Commands and Control Codes 
  1011.     to Print in FP/W.
  1012.  
  1013. 2   How can I edit an existing MS-DOS style printer driver
  1014.     or create a new one.
  1015.  
  1016. 3   How can I invoke the Windows Printer Driver Setup Dialog 
  1017.      from a program.
  1018.  
  1019. 4   How do I access DOS printer drivers in FoxPro Windows?
  1020. ----------------------------------------------------------
  1021.  
  1022.  
  1023.  
  1024. Question 1
  1025.  
  1026. How do I use @ ... SAY Commands and Control Codes to Print 
  1027. in FP/W.
  1028.  
  1029. Answer 1
  1030.  
  1031. FoxPro for Windows cannot send control codes directly to a 
  1032. printer using a Windows printer driver. There are two 
  1033. techniques to work around this:
  1034.  
  1035.  - Open the printer in "raw mode," bypassing the Windows 
  1036.    printer driver and communicating directly with the printer.
  1037.  
  1038.    -or-
  1039.  
  1040.  - Write all output to a text file, then copy the text file 
  1041.    to a printer port.
  1042.  
  1043. Writing FoxPro for Windows programs that send control codes
  1044. directly to a printer is not normally recommended. Only use 
  1045. these techniques when adapting existing FoxPro for MS-DOS 
  1046. code that sends control codes to the printer.
  1047.  
  1048. The following examples send control codes to switch an Epson 
  1049. FX-80 dot-matrix printer's compressed mode on and off.
  1050.  
  1051. NOTE: When using these techniques, do not use any of the 
  1052. ? or ?? commands for output. Only use @ ... SAY commands.
  1053.  
  1054. Technique 1: Open the Printer in Raw Mode
  1055. -----------------------------------------
  1056.  
  1057. There are two ways to open the printer in raw mode:
  1058.  
  1059.  - Use the ??? " " command.
  1060.  
  1061.    -or-
  1062.  
  1063.  - Use the SET PDSETUP TO <driver name> command.
  1064.  
  1065. Use the ??? " " Command:
  1066.  
  1067. Issue SET DEVICE TO PRINT and SET PRINTER TO commands to 
  1068. turn off all open print commands.
  1069.  
  1070. Issue a ??? " " command to open the printer in raw mode.
  1071.  
  1072. Issue @ ... SAY commands to send control codes and text 
  1073. to the printer.
  1074.  
  1075. After printing, issue a SET PRINTER TO command to flush 
  1076. the print buffer and return control to the Windows 
  1077. printer driver.
  1078.  
  1079. The following code demonstrates these steps:
  1080.  
  1081.    SET DEVICE TO PRINT
  1082.    SET PRINTER TO
  1083.    ??? " "
  1084.    @ 1,0 SAY 'NORMAL TEXT'
  1085.    @ 2,0 SAY CHR(15) && Control code to turn compressed mode on
  1086.    @ 2,0 SAY 'CONDENSED text?'
  1087.    @ 3,0 SAY CHR(18) && Control code to turn compressed mode off
  1088.    @ 3,0 SAY 'NORMAL again'
  1089.    SET DEVICE TO SCREEN
  1090.    SET PRINTER TO
  1091.  
  1092. NOTE: In some circumstances, the last @ ... SAY command 
  1093. may not print. If this problem occurs, add an additional 
  1094. @ ... SAY command that prints a blank line (so that the 
  1095. lost line is just a blank). 
  1096.  
  1097. Use the SET PDSETUP TO <Driver Name> Command:
  1098.  
  1099. Issue a SET PRINTER TO command to clear the print buffer 
  1100. of all open print commands.
  1101.  
  1102. Issue a SET PDSETUP TO <driver name> command to open the 
  1103. printer in raw mode. You MUST already have an existing 
  1104. FoxPro 2.0 or 2.6 for MS-DOS printer driver in the current
  1105. resource file.
  1106.  
  1107. NOTE: The important property of this command is that 
  1108. setting a FoxPro for MS-DOS printer driver opens the printer 
  1109. in raw mode. The printer driver itself is not used to control 
  1110. printing (that is done though control codes). In fact, any 
  1111. FoxPro for MS-DOS printer driver can be used.
  1112.  
  1113. Issue a SET DEVICE TO PRINTER command to direct the @ ... SAY 
  1114. commands to the printer.
  1115.  
  1116. Issue @ ... SAY commands to send control codes and text to 
  1117. the printer.
  1118.  
  1119. After printing, issue a SET DEVICE TO SCREEN command to
  1120. redirect the output to the screen.
  1121.  
  1122. Issue a SET PRINTER TO command to flush the print buffer 
  1123. and return control to the Windows printer driver.
  1124.  
  1125. The following code demonstrates these steps:
  1126.  
  1127.    SET PRINTER TO
  1128.    SET PDSETUP TO "Epson"
  1129.    SET DEVICE TO PRINT
  1130.  
  1131.    @ 1, 0 SAY 'NORMAL text'
  1132.    @ 2, 0 SAY  CHR(15) && Control code to turn compressed mode on
  1133.    @ 2, 0 SAY  'CONDENSED text'
  1134.    @ 3, 0 SAY  CHR(18) && Control code to turn compressed mode on
  1135.    @ 3, 0 SAY 'normal again'
  1136.  
  1137.    SET DEVICE TO SCREEN
  1138.    SET PRINT TO
  1139.  
  1140. Technique 2: Write to Text File and Copy to Printer Port
  1141. --------------------------------------------------------
  1142.  
  1143. Issue a SET DEVICE TO FILE <filename> command to direct output 
  1144. to a file.
  1145.  
  1146. Issue @ ... SAY commands to send control codes or text 
  1147. to the printer.
  1148.  
  1149. Issue a SET DEVICE TO SCREEN command to redirect output to 
  1150. the screen.
  1151.  
  1152. Issue a SET SAFETY OFF command so FoxPro for Windows does not 
  1153. confirm copying the output file to the printer port (which it 
  1154. believes to be a file).
  1155.  
  1156. Issue a COPY FILE <filename> TO <printer port>.DOS command to 
  1157. copy the output file to the printer port.
  1158.  
  1159. Issue a SET SAFETY ON command to turn safety on again.
  1160.  
  1161. The following code demonstrates these steps:
  1162.  
  1163.    SET DEVICE TO FILE output.prn
  1164.  
  1165.    @ 1,0 SAY 'NORMAL text'
  1166.    @ 2,0 SAY CHR(15) && Control code to turn compressed mode on
  1167.    @ 2,0 SAY 'CONDENSED text'
  1168.    @ 3, 0 SAY CHR(18) && Control code to turn compressed mode off
  1169.    @ 3, 0 SAY 'Back to normal text'
  1170.  
  1171.    SET DEVICE TO SCREEN
  1172.    SET SAFETY OFF
  1173.    COPY FILE output.prn TO lpt1.dos
  1174.    SET SAFETY ON
  1175.  
  1176. When Windows prints to a file named LPT1.DOS, MS-DOS 
  1177. interprets the request to open the file LPT1.DOS as a 
  1178. request to send data to the printer port,and it sends 
  1179. the data out through its own printing handler. Because 
  1180. Windows thinks that LPT1.DOS is an MS-DOS file, the Print 
  1181. Manager is not used.
  1182.  
  1183. Question 2
  1184.  
  1185. How can I edit an existing MS-DOS style printer driver
  1186. or create a new one.
  1187.  
  1188. Answer 2
  1189.  
  1190. In FoxPro for Windows, the SET PDSETUP TO <driver_name> 
  1191. command selects only an existing MS-DOS style printer 
  1192. driver. It cannot edit an existing MS-DOS style printer 
  1193. driver or create a new one. 
  1194.  
  1195. To use the SET PDSETUP TO <driver_name> command in FoxPro 
  1196. for Windows, the current resource file (by default 
  1197. FOXUSER.DBF and its associated memo file, FOXUSER.FPT) 
  1198. must already have an MS-DOS style printer driver loaded. 
  1199. This MS-DOS style printer driver must have been previously 
  1200. created by FoxPro for MS-DOS.
  1201.  
  1202. FoxPro for Windows normally uses Windows printer drivers 
  1203. for all its printing. Windows printer drivers are changed 
  1204. through the Windows Control Panel.
  1205.  
  1206. Only use the SET PDSETUP TO <driver_name> command with 
  1207. character-based reports that were created in FoxPro for 
  1208. MS-DOS.
  1209.  
  1210. NOTE: The SET PDSETUP <driver_name> command has no effect
  1211. on Windows printer drivers.
  1212.  
  1213. Question 3
  1214.  
  1215. How can I invoke the Windows Printer Driver Setup Dialog 
  1216. from a program.
  1217.  
  1218. Answer 3
  1219.  
  1220. There are two methods to invoke the Windows Printer Driver 
  1221. Setup Dialog.
  1222.  
  1223. The first method is to use the new function SYS(624) 
  1224.  
  1225. The second method is to use a RUN command.  The following 
  1226. example illstrates this:
  1227.    
  1228.   RUN /N control printers
  1229.  
  1230. NOTE: These commands will not work with Windows version 3.0. 
  1231. For example, the RUN /N CONTROL.EXE PRINTERS command will 
  1232. only run the Control Panel; it will not open the Printers 
  1233. dialog box.
  1234.  
  1235. Question 4
  1236.  
  1237. How do I access DOS printer drivers in FoxPro Windows?
  1238.  
  1239. Answer 4
  1240.  
  1241. In FoxPro for Windows, the SET PDSETUP TO <driver_name> 
  1242. command selects only an existing MS-DOS style printer driver.
  1243. It cannot edit an existing MS-DOS style printer driver or 
  1244. create a new one. 
  1245.  
  1246. To use the SET PDSETUP TO <driver_name> command in FoxPro 
  1247. for Windows, the current resource file (by default 
  1248. FOXUSER.DBF and its associated memo file, FOXUSER.FPT) 
  1249. must already have an MS-DOS style printer driver loaded. 
  1250. This MS-DOS style printer driver must have been previously 
  1251. created by FoxPro for MS-DOS.
  1252.  
  1253. FoxPro for Windows normally uses Windows printer drivers 
  1254. for all its printing.
  1255.  
  1256. Only use the SET PDSETUP TO <driver_name> command with 
  1257. character-based reports that were created in FoxPro for 
  1258. MS-DOS.
  1259.  
  1260. NOTE: The SET PDSETUP <driver_name> command has no effect 
  1261. on Windows printer drivers.
  1262.  
  1263. ---------------------------------------------------------
  1264.                  ================
  1265.                  End of PSSQA.TXT
  1266.                  ================
  1267.